Skip to content

stretch_configure_tool now works with or without SBS running#93

Open
hello-robot-shehab wants to merge 12 commits into
mainfrom
feature/stretch_configure_tool_direct_mode
Open

stretch_configure_tool now works with or without SBS running#93
hello-robot-shehab wants to merge 12 commits into
mainfrom
feature/stretch_configure_tool_direct_mode

Conversation

@hello-robot-shehab

@hello-robot-shehab hello-robot-shehab commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

To test

  1. Run stretch_configure_tool with SBS not running. Go through a tool change.
  2. Run stretch_configure_tool with SBS running. Go through a tool change.

@hello-robot-shehab hello-robot-shehab changed the title Added a -d flag to stretch_configure_tool stretch_configure_tool now works with or without SBS running Jul 13, 2026
@hello-robot-shehab

hello-robot-shehab commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

Hey @hello-bharadwaj , I made the changes we talked about. The tool now works with or without SBS, and you don't have to pass -d. Thanks for taking a look again!

…wise restarts the daemon. --daemon and --restart do not tail the log. However, the user can now pass --daemon --print or --restart --print to tail the log. --status now shows the daemon status too. --status now shows the user owning the server.
…erver isn't running, causing hanging. Cleaned up stop() in Client classes.
…nfigure_tool_direct_mode

# Conflicts:
#	stretch4_body/tools/stretch_body_server.py
@hello-bharadwaj

Copy link
Copy Markdown
Contributor

🛑 First Attempt Failed: Stretch Tool Configuration

The attempt to switch the end-of-arm tool to the Calibration Tool (eoa_wrist_dw4_tool_calibration) failed during the homing and initialization phase.

Key Issues Detected:

  • Feetech Servo Error: The system threw a communication error while trying to start the stretch_gripper due to a baud rate mismatch on servo ID 23.

    • [ERROR]: FeetechCommError. Mismatched baud rate. Expected 1000000 but servo is set to 0.
  • Process Lock Collision: The script got stuck in a continuous loop failing to acquire the transport_filelock, which indicates a zombie process or an already running background server was blocking the initialization before the user aborted (^C).

    • [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.

Traceback

hello-robot@stretch-se4-4040:~$ stretch_body_server --kill
For use with S T R E T C H (R) from Hello Robot Inc.
---------------------------------------------------------------------

Setting log level to INFO
[07/17/2026 16:45:29] [stretch_body_server] [INFO]: Received user request to kill stretch body server.
Kill Stretch Body Server Daemon: SUCCESS
hello-robot@stretch-se4-4040:~$ stretch_configure_tool 
For use with S T R E T C H (R) from Hello Robot Inc.
---------------------------------------------------------------------

This script will guide you through swapping your end-of-arm tool.
Steps:
1. Power off the current tool.
2. Swap the tool after power is off.
3. Select the new tool (auto-detection will highlight it).
4. Restart the server and home the new tool.
---------------------------------------------------------
Detected Robot Model: SE4
[07/17/2026 16:45:36] [stretch_body_client] [ERROR]: 
===============================================
                  
StretchBodyClient: Not able to connect to Stretch Body Server. Check that server is running
StretchBodyClient: Try running the server with stretch_body_server --launch
                  
===============================================
                  

[07/17/2026 16:45:36] [power_periph] [INFO]: Starting PowerPeriph...
Starting transmit_q thread: /dev/hello-power-periph
Turn off power to the peripheral? [Y/n]: y
Powering off eoa...
Connect the tool then press any key to continue...
Powering on eoa...
Scanning for tool on Feetech bus...
Detected tool: eoa_wrist_dw4_tool_nil (No Tool)
Shutting down transmit_q thread /dev/hello-power-periph
Current End-Of-Arm Tool: eoa_wrist_dw4_tool_sg4

Available Tools:
  0) No Tool: eoa_wrist_dw4_tool_nil  (detected)
      No tool attached to the robot.
  1) Stretch Gripper: eoa_wrist_dw4_tool_sg4 (current) 
      The standard Stretch 4 compliant gripper.
  2) Parallel Jaw Gripper: eoa_wrist_dw4_tool_pg4  
      A parallel jaw gripper for the Stretch 4.
  3) Tablet Holder: eoa_wrist_dw4_tool_tablet  
      A holder for a tablet device.
  4) Calibration Tool: eoa_wrist_dw4_tool_calibration  
      A tool for calibrating the robot's head sensors.
  5) Enter a custom tool name
  6) Quit without saving

Select a tool [0-6] [0]: 4

Setting End-Of-Arm Tool to: eoa_wrist_dw4_tool_calibration
Saved to /home/hello-robot/stretch_user/stretch-se4-4040/stretch_user_params.yaml

Would you like to home the end_of_arm? [Y/n]: y
[07/17/2026 16:46:14] [robot] [INFO]: Starting up Robot stretch-se4-4040 of batch francis
[07/17/2026 16:46:14] [lift] [INFO]: Starting Lift...
Starting transmit_q thread: /dev/hello-motor-lift
[07/17/2026 16:46:14] [arm] [INFO]: Starting Arm...
Starting transmit_q thread: /dev/hello-motor-arm
[07/17/2026 16:46:14] [omnibase] [INFO]: Starting Omnibase...
Starting transmit_q thread: /dev/hello-motor-omni-0
Starting transmit_q thread: /dev/hello-motor-omni-1
Starting transmit_q thread: /dev/hello-motor-omni-2
[07/17/2026 16:46:14] [power_periph] [INFO]: Starting PowerPeriph...
Starting transmit_q thread: /dev/hello-power-periph
[07/17/2026 16:46:14] [wrist_pitch] [INFO]: Starting Wrist_pitch...
[ID:021] ping Succeeded. SCServo model number : 10504
[07/17/2026 16:46:14] [wrist_pitch] [WARNING]: Feetech not calibrated: wrist_pitch
Feetech not calibrated: wrist_pitch
[07/17/2026 16:46:14] [wrist_roll] [INFO]: Starting Wrist_roll...
[ID:022] ping Succeeded. SCServo model number : 10504
[07/17/2026 16:46:14] [wrist_roll] [WARNING]: Feetech not calibrated: wrist_roll
Feetech not calibrated: wrist_roll
[07/17/2026 16:46:14] [wrist_yaw] [INFO]: Starting Wrist_yaw...
[ID:020] ping Succeeded. SCServo model number : 10504
[07/17/2026 16:46:14] [wrist_yaw] [WARNING]: Feetech not calibrated: wrist_yaw
Feetech not calibrated: wrist_yaw
[07/17/2026 16:46:14] [stretch_gripper] [INFO]: Starting Stretch_gripper...
Scanning baud rates on ID 23 and bus /dev/hello-feetech-wrist. Please wait...
Unable to identify baudrate on servo 23
[07/17/2026 16:46:14] [stretch_gripper] [ERROR]: FeetechCommError. Mismatched baud rate. Expected 1000000 but servo is set to 0.
[07/17/2026 16:46:14] [stretch_gripper] [WARNING]: FeetechSMHello Ping failed... stretch_gripper
[07/17/2026 16:46:15] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:16] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:17] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:18] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:19] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:20] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:21] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:22] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:23] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:24] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
[07/17/2026 16:46:25] [robot] [ERROR]: Unable for RobotCore to aquire transport_filelock, server may already be running.                
Try running stretch_body_server --status or stretch_free_robot_process. 
Exiting loop.
^C
Aborted!
Shutting down transmit_q thread /dev/hello-power-periph
Shutting down transmit_q thread /dev/hello-motor-omni-2
Shutting down transmit_q thread /dev/hello-motor-omni-1
Shutting down transmit_q thread /dev/hello-motor-omni-0
Shutting down transmit_q thread /dev/hello-motor-arm
Shutting down transmit_q thread /dev/hello-motor-lift

@hello-bharadwaj

Copy link
Copy Markdown
Contributor

✅ Second Attempt Successful: Stretch Tool Configuration

Traceback

hello-robot@stretch-se4-4040:~$ stretch_configure_tool 
For use with S T R E T C H (R) from Hello Robot Inc.
---------------------------------------------------------------------

This script will guide you through swapping your end-of-arm tool.
Steps:
1. Power off the current tool.
2. Swap the tool after power is off.
3. Select the new tool (auto-detection will highlight it).
4. Restart the server and home the new tool.
---------------------------------------------------------
Detected Robot Model: SE4
[07/17/2026 16:46:41] [stretch_body_client] [ERROR]: 
===============================================
                  
StretchBodyClient: Not able to connect to Stretch Body Server. Check that server is running
StretchBodyClient: Try running the server with stretch_body_server --launch
                  
===============================================
                  

[07/17/2026 16:46:42] [power_periph] [INFO]: Starting PowerPeriph...
Starting transmit_q thread: /dev/hello-power-periph
Turn off power to the peripheral? [Y/n]: y\
Error: invalid input
Turn off power to the peripheral? [Y/n]: y
Powering off eoa...
Connect the tool then press any key to continue...
Powering on eoa...
Scanning for tool on Feetech bus...
Detected tool: eoa_wrist_dw4_tool_nil (No Tool)
Shutting down transmit_q thread /dev/hello-power-periph
Current End-Of-Arm Tool: eoa_wrist_dw4_tool_calibration

Available Tools:
  0) No Tool: eoa_wrist_dw4_tool_nil  (detected)
      No tool attached to the robot.
  1) Stretch Gripper: eoa_wrist_dw4_tool_sg4  
      The standard Stretch 4 compliant gripper.
  2) Parallel Jaw Gripper: eoa_wrist_dw4_tool_pg4  
      A parallel jaw gripper for the Stretch 4.
  3) Tablet Holder: eoa_wrist_dw4_tool_tablet  
      A holder for a tablet device.
  4) Calibration Tool: eoa_wrist_dw4_tool_calibration (current) 
      A tool for calibrating the robot's head sensors.
  5) Enter a custom tool name
  6) Quit without saving

Select a tool [0-6] [0]: 4

Setting End-Of-Arm Tool to: eoa_wrist_dw4_tool_calibration
Saved to /home/hello-robot/stretch_user/stretch-se4-4040/stretch_user_params.yaml

Would you like to home the end_of_arm? [Y/n]: y
[07/17/2026 16:46:59] [robot] [INFO]: Starting up Robot stretch-se4-4040 of batch francis
[07/17/2026 16:46:59] [lift] [INFO]: Starting Lift...
Starting transmit_q thread: /dev/hello-motor-lift
[07/17/2026 16:46:59] [arm] [INFO]: Starting Arm...
Starting transmit_q thread: /dev/hello-motor-arm
[07/17/2026 16:46:59] [omnibase] [INFO]: Starting Omnibase...
Starting transmit_q thread: /dev/hello-motor-omni-0
Starting transmit_q thread: /dev/hello-motor-omni-1
Starting transmit_q thread: /dev/hello-motor-omni-2
[07/17/2026 16:46:59] [power_periph] [INFO]: Starting PowerPeriph...
Starting transmit_q thread: /dev/hello-power-periph
[07/17/2026 16:46:59] [wrist_pitch] [INFO]: Starting Wrist_pitch...
[ID:021] ping Succeeded. SCServo model number : 10504
[07/17/2026 16:46:59] [wrist_pitch] [WARNING]: Feetech not calibrated: wrist_pitch
Feetech not calibrated: wrist_pitch
[07/17/2026 16:46:59] [wrist_roll] [INFO]: Starting Wrist_roll...
[ID:022] ping Succeeded. SCServo model number : 10504
[07/17/2026 16:46:59] [wrist_roll] [WARNING]: Feetech not calibrated: wrist_roll
Feetech not calibrated: wrist_roll
[07/17/2026 16:46:59] [wrist_yaw] [INFO]: Starting Wrist_yaw...
[ID:020] ping Succeeded. SCServo model number : 10504
[07/17/2026 16:46:59] [wrist_yaw] [WARNING]: Feetech not calibrated: wrist_yaw
Feetech not calibrated: wrist_yaw
Homing end_of_arm...
[07/17/2026 16:47:02] [eoa_wrist_dw4_tool_calibration] [INFO]: Homing eoa_wrist_dw4_tool_calibration
[07/17/2026 16:47:03] [wrist_yaw] [INFO]: Moving to first hardstop (wrist_yaw)...
[07/17/2026 16:47:08] [wrist_yaw] [INFO]: Applying homing offset bias of -133 ticks
[07/17/2026 16:47:08] [wrist_yaw] [INFO]: First hardstop contact at position (ticks): 1531
[07/17/2026 16:47:08] [wrist_yaw] [INFO]: Moving to calibrated pos: (ticks) 53.0
[07/17/2026 16:47:10] [wrist_yaw] [INFO]: Done homing wrist_yaw
[07/17/2026 16:47:10] [wrist_roll] [INFO]: Moving to first hardstop (wrist_roll)...
[07/17/2026 16:47:11] [wrist_roll] [INFO]: Applying homing offset bias of 100 ticks
[07/17/2026 16:47:11] [wrist_roll] [INFO]: First hardstop contact at position (ticks): 2739
[07/17/2026 16:47:11] [wrist_roll] [INFO]: Moving to calibrated pos: (ticks) 4217.0
[07/17/2026 16:47:13] [wrist_roll] [INFO]: Done homing wrist_roll
[07/17/2026 16:47:13] [wrist_pitch] [INFO]: Moving to first hardstop (wrist_pitch)...
[07/17/2026 16:47:18] [wrist_pitch] [INFO]: Applying homing offset bias of -160 ticks
[07/17/2026 16:47:18] [wrist_pitch] [INFO]: First hardstop contact at position (ticks): 31
[07/17/2026 16:47:18] [wrist_pitch] [INFO]: Moving to calibrated pos: (ticks) -1447.0
[07/17/2026 16:47:20] [wrist_pitch] [INFO]: Done homing wrist_pitch
[07/17/2026 16:47:20] [robot] [INFO]: ---- Shutting down robot ----
[07/17/2026 16:47:20] [hello-motor-lift] [INFO]: Shutting down Stepper on: /dev/hello-motor-lift
Shutting down transmit_q thread /dev/hello-motor-lift
[07/17/2026 16:47:20] [hello-motor-arm] [INFO]: Shutting down Stepper on: /dev/hello-motor-arm
Shutting down transmit_q thread /dev/hello-motor-arm
[07/17/2026 16:47:20] [hello-motor-omni-0] [INFO]: Shutting down Stepper on: /dev/hello-motor-omni-0
Shutting down transmit_q thread /dev/hello-motor-omni-0
[07/17/2026 16:47:20] [hello-motor-omni-1] [INFO]: Shutting down Stepper on: /dev/hello-motor-omni-1
Shutting down transmit_q thread /dev/hello-motor-omni-1
[07/17/2026 16:47:20] [hello-motor-omni-2] [INFO]: Shutting down Stepper on: /dev/hello-motor-omni-2
Shutting down transmit_q thread /dev/hello-motor-omni-2
Shutting down transmit_q thread /dev/hello-power-periph
[07/17/2026 16:47:20] [robot] [INFO]: ---- Shutdown complete ----
Done! You are ready to use the tool.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants